home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / ColorSync™ 1.0.3 / Interfaces / PInterfaces / CMComponent.p < prev    next >
Encoding:
Text File  |  1993-07-19  |  3.5 KB  |  136 lines  |  [TEXT/MPS ]

  1. {
  2.     File:        CMComponent.p
  3.  
  4.     Contains:    Headers for CMM components
  5.  
  6.     Written by:    Tom Mohr
  7.  
  8.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.  
  11. }
  12.  
  13. {$IFC UNDEFINED UsingIncludes}
  14. {$SETC UsingIncludes := 0}
  15. {$ENDC}
  16.  
  17. {$IFC NOT UsingIncludes}
  18. UNIT CMComponent;
  19. INTERFACE
  20. {$ENDC}
  21.  
  22. {$IFC UNDEFINED UsingCMComponent}
  23. {$SETC UsingCMComponent := 1}
  24.  
  25. {$I+}
  26. {$SETC CMComponentIncludes := UsingIncludes}
  27. {$SETC UsingIncludes := 1}
  28.  
  29. {$IFC UNDEFINED UsingTypes}
  30. {$I $$Shell(PInterfaces)Types.p}
  31. {$ENDC}
  32.  
  33. {$IFC UNDEFINED UsingQuickdraw}
  34. {$I $$Shell(PInterfaces)Quickdraw.p}
  35. {$ENDC}
  36.  
  37. {$IFC UNDEFINED UsingComponents}
  38. {$I $$Shell(PInterfaces)Components.p}
  39. {$ENDC}
  40.  
  41. {$IFC UNDEFINED UsingCMApplication}
  42. {$I $$Shell(PInterfaces)CMApplication.p}
  43. {$ENDC}
  44.  
  45. {$SETC UsingIncludes := CMComponentIncludes}
  46.  
  47.  
  48. CONST
  49.  
  50. { CMM Components }
  51.  
  52. CMInterfaceVersion = 0;
  53.  
  54. { CMM Component function selectors }
  55. kCMInit = 0;
  56. kCMMatchColors = 1;
  57. kCMGamutTest = 2;
  58. kCMMatchPixMap = 3;
  59. kCMCheckPixMap = 4;
  60. kCMConcatenateProfiles = 5;
  61.  
  62.  
  63. { Profile Responder Components }
  64.  
  65. ProfileResponderInterfaceRev = 0;
  66.  
  67. { ProfileResponder Component function selectors }
  68. kCMGetProfile = 0;
  69. kCMSetProfile = 1;
  70. kCMSetProfileDescription = 2;
  71. kCMGetIndexedProfile = 3;
  72. kCMDeleteDeviceProfile = 4;
  73. kProfileResponderMaxSelector = kCMDeleteDeviceProfile;
  74.  
  75.  
  76. TYPE
  77.  
  78. ProfileResponder = ComponentInstance;
  79.  
  80.  
  81. { Required CMM Component routines }
  82.  
  83. FUNCTION CMInit(CMSession: ComponentInstance; srcProfile: CMProfileHandle;
  84.                 dstProfile: CMProfileHandle): CMError;
  85.     INLINE $2F3C, $0008, kCMInit, $7000, $A82A;
  86.  
  87. FUNCTION CMMatchColors(CMSession: ComponentInstance; myColors: CMColorList; count: LONGINT): CMError;
  88.     INLINE $2F3C, $0008, kCMMatchColors, $7000, $A82A;
  89.  
  90. FUNCTION CMCheckColors(CMSession: ComponentInstance; myColors: CMColorList;
  91.                        count: LONGINT; result: CMGamutResult): CMError;
  92.     INLINE $2F3C, $000C, kCMGamutTest, $7000, $A82A;
  93.  
  94.  
  95. { Optional CMM Component routines }
  96.  
  97. FUNCTION CMMatchPixMap(CMSession: ComponentInstance; myPixMap: PixMap;
  98.                        progressProc: PixMapCallBackProcPtr; refCon: LONGINT): CMError;
  99.     INLINE $2F3C, $000C, kCMMatchPixMap, $7000, $A82A;
  100.  
  101. FUNCTION CMCheckPixMap(CMSession: ComponentInstance; myPixMap: PixMap;
  102.                        progressProc: PixMapCallBackProcPtr; myBitMap: BitMap; refCon: LONGINT): CMError;
  103.     INLINE $2F3C, $0010, kCMCheckPixMap, $7000, $A82A;
  104.  
  105. FUNCTION CMConcatenateProfiles(CMSession: ComponentInstance; thru: CMProfileHandle;
  106.                                dst: CMProfileHandle; VAR newDst: CMProfileHandle): CMError;
  107.     INLINE $2F3C, $000C, kCMConcatenateProfiles, $7000, $A82A;
  108.  
  109.  
  110. { ProfileResponder Component routines }
  111.  
  112. FUNCTION CMGetProfile(myProfileResponder: ProfileResponder; aProfile: CMProfileHandle;
  113.                       VAR returnedProfile: CMProfileHandle): CMError;
  114.     INLINE $2F3C, $0008, kCMGetProfile, $7000, $A82A;
  115.  
  116. FUNCTION CMSetProfile(myProfileResponder: ProfileResponder; newProfile: CMProfileHandle): CMError;
  117.     INLINE $2F3C, $0004, kCMSetProfile, $7000, $A82A;
  118.  
  119. FUNCTION CMSetProfileDescription(myProfileResponder: ProfileResponder; deviceData: UNIV LONGINT;
  120.                                  hProfile: CMProfileHandle): CMError;
  121.     INLINE $2F3C, $0008, kCMSetProfileDescription, $7000, $A82A;
  122.  
  123. FUNCTION CMGetIndexedProfile(myProfileResponder: ProfileResponder; search: CMProfileSearchRecordHandle;
  124.                              VAR returnProfile: CMProfileHandle; VAR index: LONGINT): CMError;
  125.     INLINE $2F3C, $000C, kCMGetIndexedProfile, $7000, $A82A;
  126.  
  127. FUNCTION CMDeleteDeviceProfile(myProfileResponder: ProfileResponder;
  128.                                deleteMe: CMProfileHandle): CMError;
  129.     INLINE $2F3C, $0004, kCMDeleteDeviceProfile, $7000, $A82A;
  130.  
  131.  
  132. {$ENDC UsingCMComponent}
  133.  
  134. {$IFC NOT UsingIncludes}
  135. END.
  136. {$ENDC}